import { Guard } from '../../constants/guard';

export default [
  {
    path: '/device',
    name: 'device',
    meta: {
      title: '设备管理',
      svg: 'device',
      layout: true,
      guardList: [
        Guard.DeviceView,
        Guard.DeviceManage,
        Guard.DeviceParameterView,
        Guard.DeviceParameterManage,
        Guard.DeviceTypeView,
        Guard.DeviceTypeManage,
        Guard.DeviceActivityLogView,
        Guard.DeviceActivityLogManage
      ]
    },
    redirect: '/device/list'
  },
  {
    path: '/deviceType/list',
    name: 'deviceTypeList',
    meta: {
      title: '设备类型',
      svg: 'device-type',
      layout: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceTypeView, Guard.DeviceTypeManage]
    },
    component: () => import('../../views/deviceType/list/index.vue')
  },
  {
    path: '/device/parameter/list',
    name: 'deviceParameter',
    meta: {
      title: '设备类型参数',
      svg: 'device-parameter',
      layout: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceParameterView, Guard.DeviceParameterManage]
    },
    component: () => import('../../views/deviceParameter/list/index.vue')
  },
  {
    path: '/device/list',
    name: 'deviceList',
    meta: {
      title: '设备列表',
      svg: 'device-list',
      layout: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceView, Guard.DeviceManage]
    },
    component: () => import('../../views/device/list/index.vue')
  },
  {
    path: '/device/add',
    name: 'deviceCreate',
    meta: {
      title: '添加设备',
      svg: 'device',
      layout: true,
      hidden: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceManage]
    },
    component: () => import('../../views/device/list/add.vue')
  },
  {
    path: '/device/edit/:uuid',
    name: 'deviceEdit',
    meta: {
      title: '更新设备',
      svg: 'device',
      layout: true,
      hidden: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceManage]
    },
    component: () => import('../../views/device/list/edit.vue')
  },
  {
    path: '/device/history',
    name: 'deviceHistory',
    meta: {
      title: '历史数据',
      svg: 'device',
      layout: true,
      hidden: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceManage]
    },
    component: () => import('../../views/device/list/deviceHistory/index.vue')
  },
  {
    path: '/device/activity/list',
    name: 'deviceActivityLog',
    meta: {
      title: '设备活动日志',
      svg: 'device-activity-log',
      layout: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceActivityLogView, Guard.DeviceActivityLogManage]
    },
    component: () => import('../../views/deviceActivityLog/list/index.vue')
  },
  {
    path: '/device/activity/detail/:id',
    name: 'deviceActivityLogDetail',
    meta: {
      title: '设备活动日志详情',
      svg: 'device',
      layout: true,
      hidden: true,
      parentMenu: 'device',
      guardList: [Guard.DeviceView, Guard.DeviceManage]
    },
    component: () => import('../../views/deviceActivityLog/list/detail.vue')
  }
];
